home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / ImageCompression.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  55.0 KB  |  1,523 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        ImageCompression.h
  3.  
  4.      Contains:    QuickTime Image Compression Interfaces.
  5.  
  6.      Version:    Technology:    QuickTime 2.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1990-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __IMAGECOMPRESSION__
  19. #define __IMAGECOMPRESSION__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24. #ifndef __QUICKDRAW__
  25. #include <Quickdraw.h>
  26. #endif
  27. #ifndef __QDOFFSCREEN__
  28. #include <QDOffscreen.h>
  29. #endif
  30. #ifndef __COMPONENTS__
  31. #include <Components.h>
  32. #endif
  33. #ifndef __STANDARDFILE__
  34. #include <StandardFile.h>
  35. #endif
  36.  
  37.  
  38.  
  39. #if PRAGMA_ONCE
  40. #pragma once
  41. #endif
  42.  
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46.  
  47. #if PRAGMA_IMPORT
  48. #pragma import on
  49. #endif
  50.  
  51. #if PRAGMA_STRUCT_ALIGN
  52.     #pragma options align=mac68k
  53. #elif PRAGMA_STRUCT_PACKPUSH
  54.     #pragma pack(push, 2)
  55. #elif PRAGMA_STRUCT_PACK
  56.     #pragma pack(2)
  57. #endif
  58.  
  59. struct MatrixRecord {
  60.     Fixed                             matrix[3][3];
  61. };
  62. typedef struct MatrixRecord MatrixRecord;
  63.  
  64. typedef MatrixRecord *                    MatrixRecordPtr;
  65.  
  66. struct FixedPoint {
  67.     Fixed                             x;
  68.     Fixed                             y;
  69. };
  70. typedef struct FixedPoint FixedPoint;
  71.  
  72.  
  73. struct FixedRect {
  74.     Fixed                             left;
  75.     Fixed                             top;
  76.     Fixed                             right;
  77.     Fixed                             bottom;
  78. };
  79. typedef struct FixedRect FixedRect;
  80.  
  81.  
  82. enum {
  83.     kRawCodecType                = FOUR_CHAR_CODE('raw '),
  84.     kCinepakCodecType            = FOUR_CHAR_CODE('cvid'),
  85.     kGraphicsCodecType            = FOUR_CHAR_CODE('smc '),
  86.     kAnimationCodecType            = FOUR_CHAR_CODE('rle '),
  87.     kVideoCodecType                = FOUR_CHAR_CODE('rpza'),
  88.     kComponentVideoCodecType    = FOUR_CHAR_CODE('yuv2'),
  89.     kJPEGCodecType                = FOUR_CHAR_CODE('jpeg'),
  90.     kMotionJPEGACodecType        = FOUR_CHAR_CODE('mjpa'),
  91.     kMotionJPEGBCodecType        = FOUR_CHAR_CODE('mjpb'),
  92.     kSGICodecType                = FOUR_CHAR_CODE('.SGI'),
  93.     kPlanarRGBCodecType            = FOUR_CHAR_CODE('8BPS'),
  94.     kMacPaintCodecType            = FOUR_CHAR_CODE('PNTG'),
  95.     kGIFCodecType                = FOUR_CHAR_CODE('gif '),
  96.     kPhotoCDCodecType            = FOUR_CHAR_CODE('kpcd'),
  97.     kQuickDrawGXCodecType        = FOUR_CHAR_CODE('qdgx')
  98. };
  99.  
  100.  
  101.  
  102.  
  103. /* These are the bits that are set in the Component flags, and also in the codecInfo struct. */
  104.  
  105. enum {
  106.     codecInfoDoes1                = (1L << 0),
  107.     codecInfoDoes2                = (1L << 1),
  108.     codecInfoDoes4                = (1L << 2),
  109.     codecInfoDoes8                = (1L << 3),
  110.     codecInfoDoes16                = (1L << 4),
  111.     codecInfoDoes32                = (1L << 5),
  112.     codecInfoDoesDither            = (1L << 6),
  113.     codecInfoDoesStretch        = (1L << 7),
  114.     codecInfoDoesShrink            = (1L << 8),
  115.     codecInfoDoesMask            = (1L << 9),
  116.     codecInfoDoesTemporal        = (1L << 10),
  117.     codecInfoDoesDouble            = (1L << 11),
  118.     codecInfoDoesQuad            = (1L << 12),
  119.     codecInfoDoesHalf            = (1L << 13),
  120.     codecInfoDoesQuarter        = (1L << 14),
  121.     codecInfoDoesRotate            = (1L << 15),
  122.     codecInfoDoesHorizFlip        = (1L << 16),
  123.     codecInfoDoesVertFlip        = (1L << 17),
  124.     codecInfoDoesSkew            = (1L << 18),
  125.     codecInfoDoesBlend            = (1L << 19),
  126.     codecInfoDoesWarp            = (1L << 20),
  127.     codecInfoDoesRecompress        = (1L << 21),
  128.     codecInfoDoesSpool            = (1L << 22),
  129.     codecInfoDoesRateConstrain    = (1L << 23)
  130. };
  131.  
  132.  
  133.  
  134. enum {
  135.     codecInfoDepth1                = (1L << 0),
  136.     codecInfoDepth2                = (1L << 1),
  137.     codecInfoDepth4                = (1L << 2),
  138.     codecInfoDepth8                = (1L << 3),
  139.     codecInfoDepth16            = (1L << 4),
  140.     codecInfoDepth32            = (1L << 5),
  141.     codecInfoDepth24            = (1L << 6),
  142.     codecInfoDepth33            = (1L << 7),
  143.     codecInfoDepth34            = (1L << 8),
  144.     codecInfoDepth36            = (1L << 9),
  145.     codecInfoDepth40            = (1L << 10),
  146.     codecInfoStoresClut            = (1L << 11),
  147.     codecInfoDoesLossless        = (1L << 12),
  148.     codecInfoSequenceSensitive    = (1L << 13)
  149. };
  150.  
  151.  
  152. enum {
  153.     codecFlagUseImageBuffer        = (1L << 0),
  154.     codecFlagUseScreenBuffer    = (1L << 1),
  155.     codecFlagUpdatePrevious        = (1L << 2),
  156.     codecFlagNoScreenUpdate        = (1L << 3),
  157.     codecFlagWasCompressed        = (1L << 4),
  158.     codecFlagDontOffscreen        = (1L << 5),
  159.     codecFlagUpdatePreviousComp    = (1L << 6),
  160.     codecFlagForceKeyFrame        = (1L << 7),
  161.     codecFlagOnlyScreenUpdate    = (1L << 8),
  162.     codecFlagLiveGrab            = (1L << 9),
  163.     codecFlagDontUseNewImageBuffer = (1L << 10),
  164.     codecFlagInterlaceUpdate    = (1L << 11),
  165.     codecFlagCatchUpDiff        = (1L << 12),
  166.     codecFlagImageBufferNotSourceImage = (1L << 13),
  167.     codecFlagUsedNewImageBuffer    = (1L << 14),
  168.     codecFlagUsedImageBuffer    = (1L << 15)
  169. };
  170.  
  171.  
  172.  
  173.  
  174. enum {
  175.                                                                 /* The minimum data size for spooling in or out data */
  176.     codecMinimumDataSize        = 32768L
  177. };
  178.  
  179.  
  180.  
  181. enum {
  182.     compressorComponentType        = FOUR_CHAR_CODE('imco'),        /* the type for "Components" which compress images */
  183.     decompressorComponentType    = FOUR_CHAR_CODE('imdc')        /* the type for "Components" which decompress images */
  184. };
  185.  
  186. typedef Component                         CompressorComponent;
  187. typedef Component                         DecompressorComponent;
  188. typedef Component                         CodecComponent;
  189. #define    anyCodec                ((CodecComponent)0)
  190. #define    bestSpeedCodec            ((CodecComponent)-1)
  191. #define    bestFidelityCodec        ((CodecComponent)-2)
  192. #define    bestCompressionCodec    ((CodecComponent)-3)
  193. typedef long                             CodecType;
  194. typedef unsigned short                     CodecFlags;
  195. typedef unsigned long                     CodecQ;
  196.  
  197. enum {
  198.     codecLosslessQuality        = 0x00000400,
  199.     codecMaxQuality                = 0x000003FF,
  200.     codecMinQuality                = 0x00000000,
  201.     codecLowQuality                = 0x00000100,
  202.     codecNormalQuality            = 0x00000200,
  203.     codecHighQuality            = 0x00000300
  204. };
  205.  
  206.  
  207. enum {
  208.     codecCompletionSource        = (1 << 0),                        /* asynchronous codec is done with source data */
  209.     codecCompletionDest            = (1 << 1),                        /* asynchronous codec is done with destination data */
  210.     codecCompletionDontUnshield    = (1 << 2)                        /* on dest complete don't unshield cursor */
  211. };
  212.  
  213.  
  214. enum {
  215.     codecProgressOpen            = 0,
  216.     codecProgressUpdatePercent    = 1,
  217.     codecProgressClose            = 2
  218. };
  219.  
  220. typedef CALLBACK_API( OSErr , ICMDataProcPtr )(Ptr *dataP, long bytesNeeded, long refcon);
  221. typedef CALLBACK_API( OSErr , ICMFlushProcPtr )(Ptr data, long bytesAdded, long refcon);
  222. typedef CALLBACK_API( void , ICMCompletionProcPtr )(OSErr result, short flags, long refcon);
  223. typedef CALLBACK_API( OSErr , ICMProgressProcPtr )(short message, Fixed completeness, long refcon);
  224. typedef CALLBACK_API( void , StdPixProcPtr )(PixMap *src, Rect *srcRect, MatrixRecord *matrix, short mode, RgnHandle mask, PixMap *matte, Rect *matteRect, short flags);
  225. typedef CALLBACK_API( void , ICMAlignmentProcPtr )(Rect *rp, long refcon);
  226. typedef CALLBACK_API( void , ICMCursorShieldedProcPtr )(const Rect *r, void *refcon, long flags);
  227. typedef CALLBACK_API( void , ICMMemoryDisposedProcPtr )(Ptr memoryBlock, void *refcon);
  228. typedef void *                            ICMCursorNotify;
  229. typedef CALLBACK_API( OSErr , ICMConvertDataFormatProcPtr )(void *refCon, long flags, Handle desiredFormat, void *srcData, long srcDataSize, void **dstData, long *dstDataSize);
  230. typedef STACK_UPP_TYPE(ICMDataProcPtr)                             ICMDataUPP;
  231. typedef STACK_UPP_TYPE(ICMFlushProcPtr)                         ICMFlushUPP;
  232. typedef STACK_UPP_TYPE(ICMCompletionProcPtr)                     ICMCompletionUPP;
  233. typedef STACK_UPP_TYPE(ICMProgressProcPtr)                         ICMProgressUPP;
  234. typedef STACK_UPP_TYPE(StdPixProcPtr)                             StdPixUPP;
  235. typedef STACK_UPP_TYPE(ICMAlignmentProcPtr)                     ICMAlignmentUPP;
  236. typedef STACK_UPP_TYPE(ICMCursorShieldedProcPtr)                 ICMCursorShieldedUPP;
  237. typedef STACK_UPP_TYPE(ICMMemoryDisposedProcPtr)                 ICMMemoryDisposedUPP;
  238. typedef STACK_UPP_TYPE(ICMConvertDataFormatProcPtr)             ICMConvertDataFormatUPP;
  239. typedef long                             ImageSequence;
  240. typedef long                             ImageSequenceDataSource;
  241. typedef long                             ImageTranscodeSequence;
  242. typedef long                             ImageFieldSequence;
  243. struct ICMProgressProcRecord {
  244.     ICMProgressUPP                     progressProc;
  245.     long                             progressRefCon;
  246. };
  247. typedef struct ICMProgressProcRecord ICMProgressProcRecord;
  248.  
  249. typedef ICMProgressProcRecord *            ICMProgressProcRecordPtr;
  250. struct ICMCompletionProcRecord {
  251.     ICMCompletionUPP                 completionProc;
  252.     long                             completionRefCon;
  253. };
  254. typedef struct ICMCompletionProcRecord ICMCompletionProcRecord;
  255.  
  256. typedef ICMCompletionProcRecord *        ICMCompletionProcRecordPtr;
  257. struct ICMDataProcRecord {
  258.     ICMDataUPP                         dataProc;
  259.     long                             dataRefCon;
  260. };
  261. typedef struct ICMDataProcRecord ICMDataProcRecord;
  262.  
  263. typedef ICMDataProcRecord *                ICMDataProcRecordPtr;
  264. struct ICMFlushProcRecord {
  265.     ICMFlushUPP                     flushProc;
  266.     long                             flushRefCon;
  267. };
  268. typedef struct ICMFlushProcRecord ICMFlushProcRecord;
  269.  
  270. typedef ICMFlushProcRecord *            ICMFlushProcRecordPtr;
  271. struct ICMAlignmentProcRecord {
  272.     ICMAlignmentUPP                 alignmentProc;
  273.     long                             alignmentRefCon;
  274. };
  275. typedef struct ICMAlignmentProcRecord ICMAlignmentProcRecord;
  276.  
  277. typedef ICMAlignmentProcRecord *        ICMAlignmentProcRecordPtr;
  278. struct DataRateParams {
  279.     long                             dataRate;
  280.     long                             dataOverrun;
  281.     long                             frameDuration;
  282.     long                             keyFrameRate;
  283.     CodecQ                             minSpatialQuality;
  284.     CodecQ                             minTemporalQuality;
  285. };
  286. typedef struct DataRateParams DataRateParams;
  287.  
  288. typedef DataRateParams *                DataRateParamsPtr;
  289. struct ImageDescription {
  290.     long                             idSize;                        /* total size of ImageDescription including extra data ( CLUTs and other per sequence data ) */
  291.     CodecType                         cType;                        /* what kind of codec compressed this data */
  292.     long                             resvd1;                        /* reserved for Apple use */
  293.     short                             resvd2;                        /* reserved for Apple use */
  294.     short                             dataRefIndex;                /* set to zero  */
  295.     short                             version;                    /* which version is this data */
  296.     short                             revisionLevel;                /* what version of that codec did this */
  297.     long                             vendor;                        /* whose  codec compressed this data */
  298.     CodecQ                             temporalQuality;            /* what was the temporal quality factor  */
  299.     CodecQ                             spatialQuality;                /* what was the spatial quality factor */
  300.     short                             width;                        /* how many pixels wide is this data */
  301.     short                             height;                        /* how many pixels high is this data */
  302.     Fixed                             hRes;                        /* horizontal resolution */
  303.     Fixed                             vRes;                        /* vertical resolution */
  304.     long                             dataSize;                    /* if known, the size of data for this image descriptor */
  305.     short                             frameCount;                    /* number of frames this description applies to */
  306.     Str31                             name;                        /* name of codec ( in case not installed )  */
  307.     short                             depth;                        /* what depth is this data (1-32) or ( 33-40 grayscale ) */
  308.     short                             clutID;                        /* clut id or if 0 clut follows  or -1 if no clut */
  309. };
  310. typedef struct ImageDescription ImageDescription;
  311.  
  312. typedef ImageDescription *                ImageDescriptionPtr;
  313. typedef ImageDescriptionPtr *            ImageDescriptionHandle;
  314. struct CodecInfo {
  315.     Str31                             typeName;                    /* name of the codec type i.e.: 'Apple Image Compression' */
  316.     short                             version;                    /* version of the codec data that this codec knows about */
  317.     short                             revisionLevel;                /* revision level of this codec i.e: 0x00010001 (1.0.1) */
  318.     long                             vendor;                        /* Maker of this codec i.e: 'appl' */
  319.     long                             decompressFlags;            /* codecInfo flags for decompression capabilities */
  320.     long                             compressFlags;                /* codecInfo flags for compression capabilities */
  321.     long                             formatFlags;                /* codecInfo flags for compression format details */
  322.     UInt8                             compressionAccuracy;        /* measure (1-255) of accuracy of this codec for compress (0 if unknown) */
  323.     UInt8                             decompressionAccuracy;        /* measure (1-255) of accuracy of this codec for decompress (0 if unknown) */
  324.     unsigned short                     compressionSpeed;            /* ( millisecs for compressing 320x240 on base mac II) (0 if unknown)  */
  325.     unsigned short                     decompressionSpeed;            /* ( millisecs for decompressing 320x240 on mac II)(0 if unknown)  */
  326.     UInt8                             compressionLevel;            /* measure (1-255) of compression level of this codec (0 if unknown)  */
  327.     UInt8                             resvd;                        /* pad */
  328.     short                             minimumHeight;                /* minimum height of image (block size) */
  329.     short                             minimumWidth;                /* minimum width of image (block size) */
  330.     short                             decompressPipelineLatency;    /* in milliseconds ( for asynchronous codecs ) */
  331.     short                             compressPipelineLatency;    /* in milliseconds ( for asynchronous codecs ) */
  332.     long                             privateData;
  333. };
  334. typedef struct CodecInfo CodecInfo;
  335.  
  336. struct CodecNameSpec {
  337.     CodecComponent                     codec;
  338.     CodecType                         cType;
  339.     Str31                             typeName;
  340.     Handle                             name;
  341. };
  342. typedef struct CodecNameSpec CodecNameSpec;
  343.  
  344. struct CodecNameSpecList {
  345.     short                             count;
  346.     CodecNameSpec                     list[1];
  347. };
  348. typedef struct CodecNameSpecList CodecNameSpecList;
  349.  
  350. typedef CodecNameSpecList *                CodecNameSpecListPtr;
  351.  
  352. enum {
  353.     defaultDither                = 0,
  354.     forceDither                    = 1,
  355.     suppressDither                = 2,
  356.     useColorMatching            = 4
  357. };
  358.  
  359.  
  360. enum {
  361.     callStdBits                    = 1,
  362.     callOldBits                    = 2,
  363.     noDefaultOpcodes            = 4
  364. };
  365.  
  366.  
  367. enum {
  368.     graphicsModeStraightAlpha    = 256,
  369.     graphicsModePreWhiteAlpha    = 257,
  370.     graphicsModePreBlackAlpha    = 258,
  371.     graphicsModeCompostion        = 259,
  372.     graphicsModeStraightAlphaBlend = 260
  373. };
  374.  
  375.  
  376. enum {
  377.     evenField1ToEvenFieldOut    = 1 << 0,
  378.     evenField1ToOddFieldOut        = 1 << 1,
  379.     oddField1ToEvenFieldOut        = 1 << 2,
  380.     oddField1ToOddFieldOut        = 1 << 3,
  381.     evenField2ToEvenFieldOut    = 1 << 4,
  382.     evenField2ToOddFieldOut        = 1 << 5,
  383.     oddField2ToEvenFieldOut        = 1 << 6,
  384.     oddField2ToOddFieldOut        = 1 << 7
  385. };
  386.  
  387. struct ICMFrameTimeRecord {
  388.     wide                             value;                        /* frame time*/
  389.     long                             scale;                        /* timescale of value/duration fields*/
  390.     void *                            base;                        /* timebase*/
  391.  
  392.     long                             duration;                    /* duration frame is to be displayed (0 if unknown)*/
  393.     Fixed                             rate;                        /* rate of timebase relative to wall-time*/
  394.  
  395.     long                             recordSize;                    /* total number of bytes in ICMFrameTimeRecord*/
  396.  
  397.     long                             frameNumber;                /* number of frame, zero if not known*/
  398. };
  399. typedef struct ICMFrameTimeRecord ICMFrameTimeRecord;
  400.  
  401. typedef ICMFrameTimeRecord *            ICMFrameTimePtr;
  402. enum { uppICMDataProcInfo = 0x00000FE0 };                         /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  403. enum { uppICMFlushProcInfo = 0x00000FE0 };                         /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes) */
  404. enum { uppICMCompletionProcInfo = 0x00000E80 };                 /* pascal no_return_value Func(2_bytes, 2_bytes, 4_bytes) */
  405. enum { uppICMProgressProcInfo = 0x00000FA0 };                     /* pascal 2_bytes Func(2_bytes, 4_bytes, 4_bytes) */
  406. enum { uppStdPixProcInfo = 0x002FEFC0 };                         /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes, 2_bytes, 4_bytes, 4_bytes, 4_bytes, 2_bytes) */
  407. enum { uppICMAlignmentProcInfo = 0x000003C0 };                     /* pascal no_return_value Func(4_bytes, 4_bytes) */
  408. enum { uppICMCursorShieldedProcInfo = 0x00000FC0 };             /* pascal no_return_value Func(4_bytes, 4_bytes, 4_bytes) */
  409. enum { uppICMMemoryDisposedProcInfo = 0x000003C0 };             /* pascal no_return_value Func(4_bytes, 4_bytes) */
  410. enum { uppICMConvertDataFormatProcInfo = 0x000FFFE0 };             /* pascal 2_bytes Func(4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes) */
  411. #define NewICMDataProc(userRoutine)                             (ICMDataUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMDataProcInfo, GetCurrentArchitecture())
  412. #define NewICMFlushProc(userRoutine)                             (ICMFlushUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMFlushProcInfo, GetCurrentArchitecture())
  413. #define NewICMCompletionProc(userRoutine)                         (ICMCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMCompletionProcInfo, GetCurrentArchitecture())
  414. #define NewICMProgressProc(userRoutine)                         (ICMProgressUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMProgressProcInfo, GetCurrentArchitecture())
  415. #define NewStdPixProc(userRoutine)                                 (StdPixUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppStdPixProcInfo, GetCurrentArchitecture())
  416. #define NewICMAlignmentProc(userRoutine)                         (ICMAlignmentUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMAlignmentProcInfo, GetCurrentArchitecture())
  417. #define NewICMCursorShieldedProc(userRoutine)                     (ICMCursorShieldedUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMCursorShieldedProcInfo, GetCurrentArchitecture())
  418. #define NewICMMemoryDisposedProc(userRoutine)                     (ICMMemoryDisposedUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMMemoryDisposedProcInfo, GetCurrentArchitecture())
  419. #define NewICMConvertDataFormatProc(userRoutine)                 (ICMConvertDataFormatUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMConvertDataFormatProcInfo, GetCurrentArchitecture())
  420. #define CallICMDataProc(userRoutine, dataP, bytesNeeded, refcon)  CALL_THREE_PARAMETER_UPP((userRoutine), uppICMDataProcInfo, (dataP), (bytesNeeded), (refcon))
  421. #define CallICMFlushProc(userRoutine, data, bytesAdded, refcon)  CALL_THREE_PARAMETER_UPP((userRoutine), uppICMFlushProcInfo, (data), (bytesAdded), (refcon))
  422. #define CallICMCompletionProc(userRoutine, result, flags, refcon)  CALL_THREE_PARAMETER_UPP((userRoutine), uppICMCompletionProcInfo, (result), (flags), (refcon))
  423. #define CallICMProgressProc(userRoutine, message, completeness, refcon)  CALL_THREE_PARAMETER_UPP((userRoutine), uppICMProgressProcInfo, (message), (completeness), (refcon))
  424. #define CallStdPixProc(userRoutine, src, srcRect, matrix, mode, mask, matte, matteRect, flags)  CALL_EIGHT_PARAMETER_UPP((userRoutine), uppStdPixProcInfo, (src), (srcRect), (matrix), (mode), (mask), (matte), (matteRect), (flags))
  425. #define CallICMAlignmentProc(userRoutine, rp, refcon)             CALL_TWO_PARAMETER_UPP((userRoutine), uppICMAlignmentProcInfo, (rp), (refcon))
  426. #define CallICMCursorShieldedProc(userRoutine, r, refcon, flags)  CALL_THREE_PARAMETER_UPP((userRoutine), uppICMCursorShieldedProcInfo, (r), (refcon), (flags))
  427. #define CallICMMemoryDisposedProc(userRoutine, memoryBlock, refcon)  CALL_TWO_PARAMETER_UPP((userRoutine), uppICMMemoryDisposedProcInfo, (memoryBlock), (refcon))
  428. #define CallICMConvertDataFormatProc(userRoutine, refCon, flags, desiredFormat, srcData, srcDataSize, dstData, dstDataSize)  CALL_SEVEN_PARAMETER_UPP((userRoutine), uppICMConvertDataFormatProcInfo, (refCon), (flags), (desiredFormat), (srcData), (srcDataSize), (dstData), (dstDataSize))
  429.  
  430. EXTERN_API( OSErr )
  431. CodecManagerVersion                (long *                    version)                            TWOWORDINLINE(0x7000, 0xAAA3);
  432.  
  433. EXTERN_API( OSErr )
  434. GetCodecNameList                (CodecNameSpecListPtr *    list,
  435.                                  short                     showAll)                            TWOWORDINLINE(0x7001, 0xAAA3);
  436.  
  437. EXTERN_API( OSErr )
  438. DisposeCodecNameList            (CodecNameSpecListPtr     list)                                TWOWORDINLINE(0x700F, 0xAAA3);
  439.  
  440. EXTERN_API( OSErr )
  441. GetCodecInfo                    (CodecInfo *            info,
  442.                                  CodecType                 cType,
  443.                                  CodecComponent         codec)                                TWOWORDINLINE(0x7003, 0xAAA3);
  444.  
  445. EXTERN_API( OSErr )
  446. GetMaxCompressionSize            (PixMapHandle             src,
  447.                                  const Rect *            srcRect,
  448.                                  short                     colorDepth,
  449.                                  CodecQ                 quality,
  450.                                  CodecType                 cType,
  451.                                  CompressorComponent     codec,
  452.                                  long *                    size)                                TWOWORDINLINE(0x7004, 0xAAA3);
  453.  
  454. EXTERN_API( OSErr )
  455. GetCSequenceMaxCompressionSize    (ImageSequence             seqID,
  456.                                  PixMapHandle             src,
  457.                                  long *                    size)                                FOURWORDINLINE(0x203C, 0x000C, 0x0074, 0xAAA3);
  458.  
  459. EXTERN_API( OSErr )
  460. GetCompressionTime                (PixMapHandle             src,
  461.                                  const Rect *            srcRect,
  462.                                  short                     colorDepth,
  463.                                  CodecType                 cType,
  464.                                  CompressorComponent     codec,
  465.                                  CodecQ *                spatialQuality,
  466.                                  CodecQ *                temporalQuality,
  467.                                  unsigned long *        compressTime)                        TWOWORDINLINE(0x7005, 0xAAA3);
  468.  
  469. EXTERN_API( OSErr )
  470. CompressImage                    (PixMapHandle             src,
  471.                                  const Rect *            srcRect,
  472.                                  CodecQ                 quality,
  473.                                  CodecType                 cType,
  474.                                  ImageDescriptionHandle  desc,
  475.                                  Ptr                     data)                                TWOWORDINLINE(0x7006, 0xAAA3);
  476.  
  477. EXTERN_API( OSErr )
  478. FCompressImage                    (PixMapHandle             src,
  479.                                  const Rect *            srcRect,
  480.                                  short                     colorDepth,
  481.                                  CodecQ                 quality,
  482.                                  CodecType                 cType,
  483.                                  CompressorComponent     codec,
  484.                                  CTabHandle             ctable,
  485.                                  CodecFlags             flags,
  486.                                  long                     bufferSize,
  487.                                  ICMFlushProcRecordPtr     flushProc,
  488.                                  ICMProgressProcRecordPtr  progressProc,
  489.                                  ImageDescriptionHandle  desc,
  490.                                  Ptr                     data)                                TWOWORDINLINE(0x7007, 0xAAA3);
  491.  
  492. EXTERN_API( OSErr )
  493. DecompressImage                    (Ptr                     data,
  494.                                  ImageDescriptionHandle  desc,
  495.                                  PixMapHandle             dst,
  496.                                  const Rect *            srcRect,
  497.                                  const Rect *            dstRect,
  498.                                  short                     mode,
  499.                                  RgnHandle                 mask)                                TWOWORDINLINE(0x7008, 0xAAA3);
  500.  
  501. EXTERN_API( OSErr )
  502. FDecompressImage                (Ptr                     data,
  503.                                  ImageDescriptionHandle  desc,
  504.                                  PixMapHandle             dst,
  505.                                  const Rect *            srcRect,
  506.                                  MatrixRecordPtr         matrix,
  507.                                  short                     mode,
  508.                                  RgnHandle                 mask,
  509.                                  PixMapHandle             matte,
  510.                                  const Rect *            matteRect,
  511.                                  CodecQ                 accuracy,
  512.                                  DecompressorComponent     codec,
  513.                                  long                     bufferSize,
  514.                                  ICMDataProcRecordPtr     dataProc,
  515.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x7009, 0xAAA3);
  516.  
  517. EXTERN_API( OSErr )
  518. CompressSequenceBegin            (ImageSequence *        seqID,
  519.                                  PixMapHandle             src,
  520.                                  PixMapHandle             prev,
  521.                                  const Rect *            srcRect,
  522.                                  const Rect *            prevRect,
  523.                                  short                     colorDepth,
  524.                                  CodecType                 cType,
  525.                                  CompressorComponent     codec,
  526.                                  CodecQ                 spatialQuality,
  527.                                  CodecQ                 temporalQuality,
  528.                                  long                     keyFrameRate,
  529.                                  CTabHandle             ctable,
  530.                                  CodecFlags             flags,
  531.                                  ImageDescriptionHandle  desc)                                TWOWORDINLINE(0x700A, 0xAAA3);
  532.  
  533. EXTERN_API( OSErr )
  534. CompressSequenceFrame            (ImageSequence             seqID,
  535.                                  PixMapHandle             src,
  536.                                  const Rect *            srcRect,
  537.                                  CodecFlags             flags,
  538.                                  Ptr                     data,
  539.                                  long *                    dataSize,
  540.                                  UInt8 *                similarity,
  541.                                  ICMCompletionProcRecordPtr  asyncCompletionProc)            TWOWORDINLINE(0x700B, 0xAAA3);
  542.  
  543. EXTERN_API( OSErr )
  544. DecompressSequenceBegin            (ImageSequence *        seqID,
  545.                                  ImageDescriptionHandle  desc,
  546.                                  CGrafPtr                 port,
  547.                                  GDHandle                 gdh,
  548.                                  const Rect *            srcRect,
  549.                                  MatrixRecordPtr         matrix,
  550.                                  short                     mode,
  551.                                  RgnHandle                 mask,
  552.                                  CodecFlags             flags,
  553.                                  CodecQ                 accuracy,
  554.                                  DecompressorComponent     codec)                                TWOWORDINLINE(0x700D, 0xAAA3);
  555.  
  556. EXTERN_API( OSErr )
  557. DecompressSequenceBeginS        (ImageSequence *        seqID,
  558.                                  ImageDescriptionHandle  desc,
  559.                                  Ptr                     data,
  560.                                  long                     dataSize,
  561.                                  CGrafPtr                 port,
  562.                                  GDHandle                 gdh,
  563.                                  const Rect *            srcRect,
  564.                                  MatrixRecordPtr         matrix,
  565.                                  short                     mode,
  566.                                  RgnHandle                 mask,
  567.                                  CodecFlags             flags,
  568.                                  CodecQ                 accuracy,
  569.                                  DecompressorComponent     codec)                                FOURWORDINLINE(0x203C, 0x0030, 0x005D, 0xAAA3);
  570.  
  571. EXTERN_API( OSErr )
  572. DecompressSequenceFrame            (ImageSequence             seqID,
  573.                                  Ptr                     data,
  574.                                  CodecFlags             inFlags,
  575.                                  CodecFlags *            outFlags,
  576.                                  ICMCompletionProcRecordPtr  asyncCompletionProc)            TWOWORDINLINE(0x700E, 0xAAA3);
  577.  
  578. EXTERN_API( OSErr )
  579. DecompressSequenceFrameS        (ImageSequence             seqID,
  580.                                  Ptr                     data,
  581.                                  long                     dataSize,
  582.                                  CodecFlags             inFlags,
  583.                                  CodecFlags *            outFlags,
  584.                                  ICMCompletionProcRecordPtr  asyncCompletionProc)            FOURWORDINLINE(0x203C, 0x0016, 0x0047, 0xAAA3);
  585.  
  586. EXTERN_API( OSErr )
  587. DecompressSequenceFrameWhen        (ImageSequence             seqID,
  588.                                  Ptr                     data,
  589.                                  long                     dataSize,
  590.                                  CodecFlags             inFlags,
  591.                                  CodecFlags *            outFlags,
  592.                                  ICMCompletionProcRecordPtr  asyncCompletionProc,
  593.                                  const ICMFrameTimeRecord * frameTime)                        FOURWORDINLINE(0x203C, 0x001A, 0x005E, 0xAAA3);
  594.  
  595. EXTERN_API( OSErr )
  596. CDSequenceFlush                    (ImageSequence             seqID)                                FOURWORDINLINE(0x203C, 0x0004, 0x005F, 0xAAA3);
  597.  
  598. EXTERN_API( OSErr )
  599. SetDSequenceMatrix                (ImageSequence             seqID,
  600.                                  MatrixRecordPtr         matrix)                                TWOWORDINLINE(0x7010, 0xAAA3);
  601.  
  602. EXTERN_API( OSErr )
  603. SetDSequenceMatte                (ImageSequence             seqID,
  604.                                  PixMapHandle             matte,
  605.                                  const Rect *            matteRect)                            TWOWORDINLINE(0x7011, 0xAAA3);
  606.  
  607. EXTERN_API( OSErr )
  608. SetDSequenceMask                (ImageSequence             seqID,
  609.                                  RgnHandle                 mask)                                TWOWORDINLINE(0x7012, 0xAAA3);
  610.  
  611. EXTERN_API( OSErr )
  612. SetDSequenceTransferMode        (ImageSequence             seqID,
  613.                                  short                     mode,
  614.                                  const RGBColor *        opColor)                            TWOWORDINLINE(0x7013, 0xAAA3);
  615.  
  616. EXTERN_API( OSErr )
  617. SetDSequenceDataProc            (ImageSequence             seqID,
  618.                                  ICMDataProcRecordPtr     dataProc,
  619.                                  long                     bufferSize)                            TWOWORDINLINE(0x7014, 0xAAA3);
  620.  
  621. EXTERN_API( OSErr )
  622. SetDSequenceAccuracy            (ImageSequence             seqID,
  623.                                  CodecQ                 accuracy)                            TWOWORDINLINE(0x7034, 0xAAA3);
  624.  
  625. EXTERN_API( OSErr )
  626. SetDSequenceSrcRect                (ImageSequence             seqID,
  627.                                  const Rect *            srcRect)                            TWOWORDINLINE(0x7035, 0xAAA3);
  628.  
  629.  
  630. EXTERN_API( OSErr )
  631. GetDSequenceImageBuffer            (ImageSequence             seqID,
  632.                                  GWorldPtr *            gworld)                                TWOWORDINLINE(0x7015, 0xAAA3);
  633.  
  634. EXTERN_API( OSErr )
  635. GetDSequenceScreenBuffer        (ImageSequence             seqID,
  636.                                  GWorldPtr *            gworld)                                TWOWORDINLINE(0x7016, 0xAAA3);
  637.  
  638. EXTERN_API( OSErr )
  639. SetCSequenceQuality                (ImageSequence             seqID,
  640.                                  CodecQ                 spatialQuality,
  641.                                  CodecQ                 temporalQuality)                    TWOWORDINLINE(0x7017, 0xAAA3);
  642.  
  643. EXTERN_API( OSErr )
  644. SetCSequencePrev                (ImageSequence             seqID,
  645.                                  PixMapHandle             prev,
  646.                                  const Rect *            prevRect)                            TWOWORDINLINE(0x7018, 0xAAA3);
  647.  
  648. EXTERN_API( OSErr )
  649. SetCSequenceFlushProc            (ImageSequence             seqID,
  650.                                  ICMFlushProcRecordPtr     flushProc,
  651.                                  long                     bufferSize)                            TWOWORDINLINE(0x7033, 0xAAA3);
  652.  
  653. EXTERN_API( OSErr )
  654. SetCSequenceKeyFrameRate        (ImageSequence             seqID,
  655.                                  long                     keyFrameRate)                        TWOWORDINLINE(0x7036, 0xAAA3);
  656.  
  657. EXTERN_API( OSErr )
  658. GetCSequenceKeyFrameRate        (ImageSequence             seqID,
  659.                                  long *                    keyFrameRate)                        FOURWORDINLINE(0x203C, 0x0008, 0x004B, 0xAAA3);
  660.  
  661. EXTERN_API( OSErr )
  662. GetCSequencePrevBuffer            (ImageSequence             seqID,
  663.                                  GWorldPtr *            gworld)                                TWOWORDINLINE(0x7019, 0xAAA3);
  664.  
  665. EXTERN_API( OSErr )
  666. CDSequenceBusy                    (ImageSequence             seqID)                                TWOWORDINLINE(0x701A, 0xAAA3);
  667.  
  668. EXTERN_API( OSErr )
  669. CDSequenceEnd                    (ImageSequence             seqID)                                TWOWORDINLINE(0x701B, 0xAAA3);
  670.  
  671. EXTERN_API( OSErr )
  672. CDSequenceEquivalentImageDescription (ImageSequence     seqID,
  673.                                  ImageDescriptionHandle  newDesc,
  674.                                  Boolean *                equivalent)                            FOURWORDINLINE(0x203C, 0x000C, 0x0065, 0xAAA3);
  675.  
  676. EXTERN_API( OSErr )
  677. GetCompressedImageSize            (ImageDescriptionHandle  desc,
  678.                                  Ptr                     data,
  679.                                  long                     bufferSize,
  680.                                  ICMDataProcRecordPtr     dataProc,
  681.                                  long *                    dataSize)                            TWOWORDINLINE(0x701C, 0xAAA3);
  682.  
  683. EXTERN_API( OSErr )
  684. GetSimilarity                    (PixMapHandle             src,
  685.                                  const Rect *            srcRect,
  686.                                  ImageDescriptionHandle  desc,
  687.                                  Ptr                     data,
  688.                                  Fixed *                similarity)                            TWOWORDINLINE(0x701D, 0xAAA3);
  689.  
  690. EXTERN_API( OSErr )
  691. GetImageDescriptionCTable        (ImageDescriptionHandle  desc,
  692.                                  CTabHandle *            ctable)                                TWOWORDINLINE(0x701E, 0xAAA3);
  693.  
  694. EXTERN_API( OSErr )
  695. SetImageDescriptionCTable        (ImageDescriptionHandle  desc,
  696.                                  CTabHandle             ctable)                                TWOWORDINLINE(0x701F, 0xAAA3);
  697.  
  698. EXTERN_API( OSErr )
  699. GetImageDescriptionExtension    (ImageDescriptionHandle  desc,
  700.                                  Handle *                extension,
  701.                                  long                     idType,
  702.                                  long                     index)                                TWOWORDINLINE(0x7020, 0xAAA3);
  703.  
  704. EXTERN_API( OSErr )
  705. AddImageDescriptionExtension    (ImageDescriptionHandle  desc,
  706.                                  Handle                 extension,
  707.                                  long                     idType)                                TWOWORDINLINE(0x7021, 0xAAA3);
  708.  
  709.  
  710. EXTERN_API( OSErr )
  711. RemoveImageDescriptionExtension    (ImageDescriptionHandle  desc,
  712.                                  long                     idType,
  713.                                  long                     index)                                FOURWORDINLINE(0x203C, 0x000C, 0x003A, 0xAAA3);
  714.  
  715. EXTERN_API( OSErr )
  716. CountImageDescriptionExtensionType (ImageDescriptionHandle  desc,
  717.                                  long                     idType,
  718.                                  long *                    count)                                FOURWORDINLINE(0x203C, 0x000C, 0x003B, 0xAAA3);
  719.  
  720. EXTERN_API( OSErr )
  721. GetNextImageDescriptionExtensionType (ImageDescriptionHandle  desc,
  722.                                  long *                    idType)                                FOURWORDINLINE(0x203C, 0x0008, 0x003C, 0xAAA3);
  723.  
  724. EXTERN_API( OSErr )
  725. FindCodec                        (CodecType                 cType,
  726.                                  CodecComponent         specCodec,
  727.                                  CompressorComponent *    compressor,
  728.                                  DecompressorComponent * decompressor)                        TWOWORDINLINE(0x7023, 0xAAA3);
  729.  
  730. EXTERN_API( OSErr )
  731. CompressPicture                    (PicHandle                 srcPicture,
  732.                                  PicHandle                 dstPicture,
  733.                                  CodecQ                 quality,
  734.                                  CodecType                 cType)                                TWOWORDINLINE(0x7024, 0xAAA3);
  735.  
  736. EXTERN_API( OSErr )
  737. FCompressPicture                (PicHandle                 srcPicture,
  738.                                  PicHandle                 dstPicture,
  739.                                  short                     colorDepth,
  740.                                  CTabHandle             ctable,
  741.                                  CodecQ                 quality,
  742.                                  short                     doDither,
  743.                                  short                     compressAgain,
  744.                                  ICMProgressProcRecordPtr  progressProc,
  745.                                  CodecType                 cType,
  746.                                  CompressorComponent     codec)                                TWOWORDINLINE(0x7025, 0xAAA3);
  747.  
  748. EXTERN_API( OSErr )
  749. CompressPictureFile                (short                     srcRefNum,
  750.                                  short                     dstRefNum,
  751.                                  CodecQ                 quality,
  752.                                  CodecType                 cType)                                TWOWORDINLINE(0x7026, 0xAAA3);
  753.  
  754. EXTERN_API( OSErr )
  755. FCompressPictureFile            (short                     srcRefNum,
  756.                                  short                     dstRefNum,
  757.                                  short                     colorDepth,
  758.                                  CTabHandle             ctable,
  759.                                  CodecQ                 quality,
  760.                                  short                     doDither,
  761.                                  short                     compressAgain,
  762.                                  ICMProgressProcRecordPtr  progressProc,
  763.                                  CodecType                 cType,
  764.                                  CompressorComponent     codec)                                TWOWORDINLINE(0x7027, 0xAAA3);
  765.  
  766. EXTERN_API( OSErr )
  767. GetPictureFileHeader            (short                     refNum,
  768.                                  Rect *                    frame,
  769.                                  OpenCPicParams *        header)                                TWOWORDINLINE(0x7028, 0xAAA3);
  770.  
  771. EXTERN_API( OSErr )
  772. DrawPictureFile                    (short                     refNum,
  773.                                  const Rect *            frame,
  774.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x7029, 0xAAA3);
  775.  
  776. EXTERN_API( OSErr )
  777. DrawTrimmedPicture                (PicHandle                 srcPicture,
  778.                                  const Rect *            frame,
  779.                                  RgnHandle                 trimMask,
  780.                                  short                     doDither,
  781.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x702E, 0xAAA3);
  782.  
  783. EXTERN_API( OSErr )
  784. DrawTrimmedPictureFile            (short                     srcRefnum,
  785.                                  const Rect *            frame,
  786.                                  RgnHandle                 trimMask,
  787.                                  short                     doDither,
  788.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x702F, 0xAAA3);
  789.  
  790. EXTERN_API( OSErr )
  791. MakeThumbnailFromPicture        (PicHandle                 picture,
  792.                                  short                     colorDepth,
  793.                                  PicHandle                 thumbnail,
  794.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x702A, 0xAAA3);
  795.  
  796. EXTERN_API( OSErr )
  797. MakeThumbnailFromPictureFile    (short                     refNum,
  798.                                  short                     colorDepth,
  799.                                  PicHandle                 thumbnail,
  800.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x702B, 0xAAA3);
  801.  
  802. EXTERN_API( OSErr )
  803. MakeThumbnailFromPixMap            (PixMapHandle             src,
  804.                                  const Rect *            srcRect,
  805.                                  short                     colorDepth,
  806.                                  PicHandle                 thumbnail,
  807.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x702C, 0xAAA3);
  808.  
  809. EXTERN_API( OSErr )
  810. TrimImage                        (ImageDescriptionHandle  desc,
  811.                                  Ptr                     inData,
  812.                                  long                     inBufferSize,
  813.                                  ICMDataProcRecordPtr     dataProc,
  814.                                  Ptr                     outData,
  815.                                  long                     outBufferSize,
  816.                                  ICMFlushProcRecordPtr     flushProc,
  817.                                  Rect *                    trimRect,
  818.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x702D, 0xAAA3);
  819.  
  820. EXTERN_API( OSErr )
  821. ConvertImage                    (ImageDescriptionHandle  srcDD,
  822.                                  Ptr                     srcData,
  823.                                  short                     colorDepth,
  824.                                  CTabHandle             ctable,
  825.                                  CodecQ                 accuracy,
  826.                                  CodecQ                 quality,
  827.                                  CodecType                 cType,
  828.                                  CodecComponent         codec,
  829.                                  ImageDescriptionHandle  dstDD,
  830.                                  Ptr                     dstData)                            TWOWORDINLINE(0x7030, 0xAAA3);
  831.  
  832. EXTERN_API( OSErr )
  833. GetCompressedPixMapInfo            (PixMapPtr                 pix,
  834.                                  ImageDescriptionHandle * desc,
  835.                                  Ptr *                    data,
  836.                                  long *                    bufferSize,
  837.                                  ICMDataProcRecord *    dataProc,
  838.                                  ICMProgressProcRecord * progressProc)                        TWOWORDINLINE(0x7037, 0xAAA3);
  839.  
  840. EXTERN_API( OSErr )
  841. SetCompressedPixMapInfo            (PixMapPtr                 pix,
  842.                                  ImageDescriptionHandle  desc,
  843.                                  Ptr                     data,
  844.                                  long                     bufferSize,
  845.                                  ICMDataProcRecordPtr     dataProc,
  846.                                  ICMProgressProcRecordPtr  progressProc)                    TWOWORDINLINE(0x7038, 0xAAA3);
  847.  
  848. EXTERN_API( void )
  849. StdPix                            (PixMapPtr                 src,
  850.                                  const Rect *            srcRect,
  851.                                  MatrixRecordPtr         matrix,
  852.                                  short                     mode,
  853.                                  RgnHandle                 mask,
  854.                                  PixMapPtr                 matte,
  855.                                  const Rect *            matteRect,
  856.                                  short                     flags)                                TWOWORDINLINE(0x700C, 0xAAA3);
  857.  
  858. EXTERN_API( OSErr )
  859. TransformRgn                    (MatrixRecordPtr         matrix,
  860.                                  RgnHandle                 rgn)                                TWOWORDINLINE(0x7039, 0xAAA3);
  861.  
  862.  
  863. /***********
  864.     preview stuff
  865. ***********/
  866. EXTERN_API( void )
  867. SFGetFilePreview                (Point                     where,
  868.                                  ConstStr255Param         prompt,
  869.                                  FileFilterUPP             fileFilter,
  870.                                  short                     numTypes,
  871.                                  ConstSFTypeListPtr     typeList,
  872.                                  DlgHookUPP             dlgHook,
  873.                                  SFReply *                reply)                                TWOWORDINLINE(0x7041, 0xAAA3);
  874.  
  875. EXTERN_API( void )
  876. SFPGetFilePreview                (Point                     where,
  877.                                  ConstStr255Param         prompt,
  878.                                  FileFilterUPP             fileFilter,
  879.                                  short                     numTypes,
  880.                                  ConstSFTypeListPtr     typeList,
  881.                                  DlgHookUPP             dlgHook,
  882.                                  SFReply *                reply,
  883.                                  short                     dlgID,
  884.                                  ModalFilterUPP         filterProc)                            TWOWORDINLINE(0x7042, 0xAAA3);
  885.  
  886. EXTERN_API( void )
  887. StandardGetFilePreview            (FileFilterUPP             fileFilter,
  888.                                  short                     numTypes,
  889.                                  ConstSFTypeListPtr     typeList,
  890.                                  StandardFileReply *    reply)                                TWOWORDINLINE(0x7043, 0xAAA3);
  891.  
  892. EXTERN_API( void )
  893. CustomGetFilePreview            (FileFilterYDUPP         fileFilter,
  894.                                  short                     numTypes,
  895.                                  ConstSFTypeListPtr     typeList,
  896.                                  StandardFileReply *    reply,
  897.                                  short                     dlgID,
  898.                                  Point                     where,
  899.                                  DlgHookYDUPP             dlgHook,
  900.                                  ModalFilterYDUPP         filterProc,
  901.                                  ActivationOrderListPtr  activeList,
  902.                                  ActivateYDUPP             activateProc,
  903.                                  void *                    yourDataPtr)                        TWOWORDINLINE(0x7044, 0xAAA3);
  904.  
  905. EXTERN_API( OSErr )
  906. MakeFilePreview                    (short                     resRefNum,
  907.                                  ICMProgressProcRecordPtr  progress)                        TWOWORDINLINE(0x7045, 0xAAA3);
  908.  
  909. EXTERN_API( OSErr )
  910. AddFilePreview                    (short                     resRefNum,
  911.                                  OSType                 previewType,
  912.                                  Handle                 previewData)                        TWOWORDINLINE(0x7046, 0xAAA3);
  913.  
  914.  
  915. enum {
  916.     sfpItemPreviewAreaUser        = 11,
  917.     sfpItemPreviewStaticText    = 12,
  918.     sfpItemPreviewDividerUser    = 13,
  919.     sfpItemCreatePreviewButton    = 14,
  920.     sfpItemShowPreviewButton    = 15
  921. };
  922.  
  923. struct PreviewResourceRecord {
  924.     unsigned long                     modDate;
  925.     short                             version;
  926.     OSType                             resType;
  927.     short                             resID;
  928. };
  929. typedef struct PreviewResourceRecord PreviewResourceRecord;
  930.  
  931. typedef PreviewResourceRecord *            PreviewResourcePtr;
  932. typedef PreviewResourcePtr *            PreviewResource;
  933. EXTERN_API( void )
  934. AlignScreenRect                    (Rect *                    rp,
  935.                                  ICMAlignmentProcRecordPtr  alignmentProc)                    FOURWORDINLINE(0x203C, 0x0008, 0x004C, 0xAAA3);
  936.  
  937. EXTERN_API( void )
  938. AlignWindow                        (WindowPtr                 wp,
  939.                                  Boolean                 front,
  940.                                  const Rect *            alignmentRect,
  941.                                  ICMAlignmentProcRecordPtr  alignmentProc)                    FOURWORDINLINE(0x203C, 0x000E, 0x004D, 0xAAA3);
  942.  
  943. EXTERN_API( void )
  944. DragAlignedWindow                (WindowPtr                 wp,
  945.                                  Point                     startPt,
  946.                                  Rect *                    boundsRect,
  947.                                  Rect *                    alignmentRect,
  948.                                  ICMAlignmentProcRecordPtr  alignmentProc)                    FOURWORDINLINE(0x203C, 0x0014, 0x004E, 0xAAA3);
  949.  
  950. EXTERN_API( long )
  951. DragAlignedGrayRgn                (RgnHandle                 theRgn,
  952.                                  Point                     startPt,
  953.                                  Rect *                    boundsRect,
  954.                                  Rect *                    slopRect,
  955.                                  short                     axis,
  956.                                  UniversalProcPtr         actionProc,
  957.                                  Rect *                    alignmentRect,
  958.                                  ICMAlignmentProcRecordPtr  alignmentProc)                    FOURWORDINLINE(0x203C, 0x001E, 0x004F, 0xAAA3);
  959.  
  960. EXTERN_API( OSErr )
  961. SetCSequenceDataRateParams        (ImageSequence             seqID,
  962.                                  DataRateParamsPtr         params)                                FOURWORDINLINE(0x203C, 0x0008, 0x0050, 0xAAA3);
  963.  
  964. EXTERN_API( OSErr )
  965. SetCSequenceFrameNumber            (ImageSequence             seqID,
  966.                                  long                     frameNumber)                        FOURWORDINLINE(0x203C, 0x0008, 0x0051, 0xAAA3);
  967.  
  968. EXTERN_API( OSErr )
  969. SetCSequencePreferredPacketSize    (ImageSequence             seqID,
  970.                                  long                     preferredPacketSizeInBytes)            FOURWORDINLINE(0x203C, 0x0008, 0x0078, 0xAAA3);
  971.  
  972. EXTERN_API( OSErr )
  973. NewImageGWorld                    (GWorldPtr *            gworld,
  974.                                  ImageDescriptionHandle  idh,
  975.                                  GWorldFlags             flags)                                FOURWORDINLINE(0x203C, 0x000C, 0x0052, 0xAAA3);
  976.  
  977. EXTERN_API( OSErr )
  978. GetCSequenceDataRateParams        (ImageSequence             seqID,
  979.                                  DataRateParamsPtr         params)                                FOURWORDINLINE(0x203C, 0x0008, 0x0053, 0xAAA3);
  980.  
  981. EXTERN_API( OSErr )
  982. GetCSequenceFrameNumber            (ImageSequence             seqID,
  983.                                  long *                    frameNumber)                        FOURWORDINLINE(0x203C, 0x0008, 0x0054, 0xAAA3);
  984.  
  985. EXTERN_API( OSErr )
  986. GetBestDeviceRect                (GDHandle *                gdh,
  987.                                  Rect *                    rp)                                    FOURWORDINLINE(0x203C, 0x0008, 0x0055, 0xAAA3);
  988.  
  989. EXTERN_API( OSErr )
  990. SetSequenceProgressProc            (ImageSequence             seqID,
  991.                                  ICMProgressProcRecord * progressProc)                        FOURWORDINLINE(0x203C, 0x0008, 0x0056, 0xAAA3);
  992.  
  993. EXTERN_API( OSErr )
  994. GDHasScale                        (GDHandle                 gdh,
  995.                                  short                     depth,
  996.                                  Fixed *                scale)                                FOURWORDINLINE(0x203C, 0x000A, 0x005A, 0xAAA3);
  997.  
  998. EXTERN_API( OSErr )
  999. GDGetScale                        (GDHandle                 gdh,
  1000.                                  Fixed *                scale,
  1001.                                  short *                flags)                                FOURWORDINLINE(0x203C, 0x000C, 0x005B, 0xAAA3);
  1002.  
  1003. EXTERN_API( OSErr )
  1004. GDSetScale                        (GDHandle                 gdh,
  1005.                                  Fixed                     scale,
  1006.                                  short                     flags)                                FOURWORDINLINE(0x203C, 0x000A, 0x005C, 0xAAA3);
  1007.  
  1008. EXTERN_API( OSErr )
  1009. ICMShieldSequenceCursor            (ImageSequence             seqID)                                FOURWORDINLINE(0x203C, 0x0004, 0x0062, 0xAAA3);
  1010.  
  1011. EXTERN_API( void )
  1012. ICMDecompressComplete            (ImageSequence             seqID,
  1013.                                  OSErr                     err,
  1014.                                  short                     flag,
  1015.                                  ICMCompletionProcRecordPtr  completionRtn)                    FOURWORDINLINE(0x203C, 0x000C, 0x0063, 0xAAA3);
  1016.  
  1017. EXTERN_API( OSErr )
  1018. SetDSequenceTimeCode            (ImageSequence             seqID,
  1019.                                  void *                    timeCodeFormat,
  1020.                                  void *                    timeCodeTime)                        FOURWORDINLINE(0x203C, 0x000C, 0x0064, 0xAAA3);
  1021.  
  1022. EXTERN_API( OSErr )
  1023. CDSequenceNewMemory                (ImageSequence             seqID,
  1024.                                  Ptr *                    data,
  1025.                                  Size                     dataSize,
  1026.                                  long                     dataUse,
  1027.                                  ICMMemoryDisposedUPP     memoryGoneProc,
  1028.                                  void *                    refCon)                                FOURWORDINLINE(0x203C, 0x0018, 0x0066, 0xAAA3);
  1029.  
  1030. EXTERN_API( OSErr )
  1031. CDSequenceDisposeMemory            (ImageSequence             seqID,
  1032.                                  Ptr                     data)                                FOURWORDINLINE(0x203C, 0x0008, 0x0067, 0xAAA3);
  1033.  
  1034. EXTERN_API( OSErr )
  1035. CDSequenceNewDataSource            (ImageSequence             seqID,
  1036.                                  ImageSequenceDataSource * sourceID,
  1037.                                  OSType                 sourceType,
  1038.                                  long                     sourceInputNumber,
  1039.                                  Handle                 dataDescription,
  1040.                                  void *                    transferProc,
  1041.                                  void *                    refCon)                                FOURWORDINLINE(0x203C, 0x001C, 0x0068, 0xAAA3);
  1042.  
  1043. EXTERN_API( OSErr )
  1044. CDSequenceDisposeDataSource        (ImageSequenceDataSource  sourceID)                            FOURWORDINLINE(0x203C, 0x0004, 0x0069, 0xAAA3);
  1045.  
  1046. EXTERN_API( OSErr )
  1047. CDSequenceSetSourceData            (ImageSequenceDataSource  sourceID,
  1048.                                  void *                    data,
  1049.                                  long                     dataSize)                            FOURWORDINLINE(0x203C, 0x000C, 0x006A, 0xAAA3);
  1050.  
  1051. EXTERN_API( OSErr )
  1052. CDSequenceChangedSourceData        (ImageSequenceDataSource  sourceID)                            FOURWORDINLINE(0x203C, 0x0004, 0x006B, 0xAAA3);
  1053.  
  1054. EXTERN_API( OSErr )
  1055. PtInDSequenceData                (ImageSequence             seqID,
  1056.                                  void *                    data,
  1057.                                  Size                     dataSize,
  1058.                                  Point                     where,
  1059.                                  Boolean *                hit)                                FOURWORDINLINE(0x203C, 0x0014, 0x006C, 0xAAA3);
  1060.  
  1061. EXTERN_API( OSErr )
  1062. GetGraphicsImporterForFile        (const FSSpec *            theFile,
  1063.                                  ComponentInstance *    gi)                                    FOURWORDINLINE(0x203C, 0x0008, 0x006E, 0xAAA3);
  1064.  
  1065. EXTERN_API( OSErr )
  1066. GetGraphicsImporterForDataRef    (Handle                 dataRef,
  1067.                                  OSType                 dataRefType,
  1068.                                  ComponentInstance *    gi)                                    FOURWORDINLINE(0x203C, 0x000C, 0x0077, 0xAAA3);
  1069.  
  1070. EXTERN_API( OSErr )
  1071. ImageTranscodeSequenceBegin        (ImageTranscodeSequence * its,
  1072.                                  ImageDescriptionHandle  srcDesc,
  1073.                                  OSType                 destType,
  1074.                                  ImageDescriptionHandle * dstDesc,
  1075.                                  void *                    data,
  1076.                                  long                     dataSize)                            FOURWORDINLINE(0x203C, 0x0018, 0x006F, 0xAAA3);
  1077.  
  1078. EXTERN_API( OSErr )
  1079. ImageTranscodeSequenceEnd        (ImageTranscodeSequence  its)                                FOURWORDINLINE(0x203C, 0x0004, 0x0070, 0xAAA3);
  1080.  
  1081. EXTERN_API( OSErr )
  1082. ImageTranscodeFrame                (ImageTranscodeSequence  its,
  1083.                                  void *                    srcData,
  1084.                                  long                     srcDataSize,
  1085.                                  void **                dstData,
  1086.                                  long *                    dstDataSize)                        FOURWORDINLINE(0x203C, 0x0014, 0x0071, 0xAAA3);
  1087.  
  1088. EXTERN_API( OSErr )
  1089. ImageTranscodeDisposeFrameData    (ImageTranscodeSequence  its,
  1090.                                  void *                    dstData)                            FOURWORDINLINE(0x203C, 0x0008, 0x0072, 0xAAA3);
  1091.  
  1092. EXTERN_API( OSErr )
  1093. CDSequenceInvalidate            (ImageSequence             seqID,
  1094.                                  RgnHandle                 invalRgn)                            FOURWORDINLINE(0x203C, 0x0008, 0x0073, 0xAAA3);
  1095.  
  1096. EXTERN_API( OSErr )
  1097. ImageFieldSequenceBegin            (ImageFieldSequence *    ifs,
  1098.                                  ImageDescriptionHandle  desc1,
  1099.                                  ImageDescriptionHandle  desc2,
  1100.                                  ImageDescriptionHandle  descOut)                            FOURWORDINLINE(0x203C, 0x0010, 0x006D, 0xAAA3);
  1101.  
  1102. EXTERN_API( OSErr )
  1103. ImageFieldSequenceExtractCombine (ImageFieldSequence     ifs,
  1104.                                  long                     fieldFlags,
  1105.                                  void *                    data1,
  1106.                                  long                     dataSize1,
  1107.                                  void *                    data2,
  1108.                                  long                     dataSize2,
  1109.                                  void *                    outputData,
  1110.                                  long *                    outDataSize)                        FOURWORDINLINE(0x203C, 0x0020, 0x0075, 0xAAA3);
  1111.  
  1112. EXTERN_API( OSErr )
  1113. ImageFieldSequenceEnd            (ImageFieldSequence     ifs)                                FOURWORDINLINE(0x203C, 0x0004, 0x0076, 0xAAA3);
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119. enum {
  1120.     identityMatrixType            = 0x00,                            /* result if matrix is identity */
  1121.     translateMatrixType            = 0x01,                            /* result if matrix translates */
  1122.     scaleMatrixType                = 0x02,                            /* result if matrix scales */
  1123.     scaleTranslateMatrixType    = 0x03,                            /* result if matrix scales and translates */
  1124.     linearMatrixType            = 0x04,                            /* result if matrix is general 2 x 2 */
  1125.     linearTranslateMatrixType    = 0x05,                            /* result if matrix is general 2 x 2 and translates */
  1126.     perspectiveMatrixType        = 0x06                            /* result if matrix is general 3 x 3 */
  1127. };
  1128.  
  1129. typedef unsigned short                     MatrixFlags;
  1130. EXTERN_API( short )
  1131. GetMatrixType                    (const MatrixRecord *    m)                                    TWOWORDINLINE(0x7014, 0xABC2);
  1132.  
  1133. EXTERN_API( void )
  1134. CopyMatrix                        (const MatrixRecord *    m1,
  1135.                                  MatrixRecord *            m2)                                    TWOWORDINLINE(0x7020, 0xABC2);
  1136.  
  1137. EXTERN_API( Boolean )
  1138. EqualMatrix                        (const MatrixRecord *    m1,
  1139.                                  const MatrixRecord *    m2)                                    TWOWORDINLINE(0x7021, 0xABC2);
  1140.  
  1141. EXTERN_API( void )
  1142. SetIdentityMatrix                (MatrixRecord *            matrix)                                TWOWORDINLINE(0x7015, 0xABC2);
  1143.  
  1144. EXTERN_API( void )
  1145. TranslateMatrix                    (MatrixRecord *            m,
  1146.                                  Fixed                     deltaH,
  1147.                                  Fixed                     deltaV)                                TWOWORDINLINE(0x7019, 0xABC2);
  1148.  
  1149. EXTERN_API( void )
  1150. RotateMatrix                    (MatrixRecord *            m,
  1151.                                  Fixed                     degrees,
  1152.                                  Fixed                     aboutX,
  1153.                                  Fixed                     aboutY)                                TWOWORDINLINE(0x7016, 0xABC2);
  1154.  
  1155. EXTERN_API( void )
  1156. ScaleMatrix                        (MatrixRecord *            m,
  1157.                                  Fixed                     scaleX,
  1158.                                  Fixed                     scaleY,
  1159.                                  Fixed                     aboutX,
  1160.                                  Fixed                     aboutY)                                TWOWORDINLINE(0x7017, 0xABC2);
  1161.  
  1162. EXTERN_API( void )
  1163. SkewMatrix                        (MatrixRecord *            m,
  1164.                                  Fixed                     skewX,
  1165.                                  Fixed                     skewY,
  1166.                                  Fixed                     aboutX,
  1167.                                  Fixed                     aboutY)                                TWOWORDINLINE(0x7018, 0xABC2);
  1168.  
  1169. EXTERN_API( OSErr )
  1170. TransformFixedPoints            (const MatrixRecord *    m,
  1171.                                  FixedPoint *            fpt,
  1172.                                  long                     count)                                TWOWORDINLINE(0x7022, 0xABC2);
  1173.  
  1174. EXTERN_API( OSErr )
  1175. TransformPoints                    (const MatrixRecord *    mp,
  1176.                                  Point *                pt1,
  1177.                                  long                     count)                                TWOWORDINLINE(0x7023, 0xABC2);
  1178.  
  1179. EXTERN_API( Boolean )
  1180. TransformFixedRect                (const MatrixRecord *    m,
  1181.                                  FixedRect *            fr,
  1182.                                  FixedPoint *            fpp)                                TWOWORDINLINE(0x7024, 0xABC2);
  1183.  
  1184. EXTERN_API( Boolean )
  1185. TransformRect                    (const MatrixRecord *    m,
  1186.                                  Rect *                    r,
  1187.                                  FixedPoint *            fpp)                                TWOWORDINLINE(0x7025, 0xABC2);
  1188.  
  1189. EXTERN_API( Boolean )
  1190. InverseMatrix                    (const MatrixRecord *    m,
  1191.                                  MatrixRecord *            im)                                    TWOWORDINLINE(0x701C, 0xABC2);
  1192.  
  1193. EXTERN_API( void )
  1194. ConcatMatrix                    (const MatrixRecord *    a,
  1195.                                  MatrixRecord *            b)                                    TWOWORDINLINE(0x701B, 0xABC2);
  1196.  
  1197. EXTERN_API( void )
  1198. RectMatrix                        (MatrixRecord *            matrix,
  1199.                                  const Rect *            srcRect,
  1200.                                  const Rect *            dstRect)                            TWOWORDINLINE(0x701E, 0xABC2);
  1201.  
  1202. EXTERN_API( void )
  1203. MapMatrix                        (MatrixRecord *            matrix,
  1204.                                  const Rect *            fromRect,
  1205.                                  const Rect *            toRect)                                TWOWORDINLINE(0x701D, 0xABC2);
  1206.  
  1207.  
  1208.  
  1209.  
  1210.  
  1211.  
  1212.  
  1213. EXTERN_API( void )
  1214. CompAdd                            (wide *                    src,
  1215.                                  wide *                    dst)                                TWOWORDINLINE(0x7001, 0xABC2);
  1216.  
  1217. EXTERN_API( void )
  1218. CompSub                            (wide *                    src,
  1219.                                  wide *                    dst)                                TWOWORDINLINE(0x7002, 0xABC2);
  1220.  
  1221. EXTERN_API( void )
  1222. CompNeg                            (wide *                    dst)                                TWOWORDINLINE(0x7003, 0xABC2);
  1223.  
  1224. EXTERN_API( void )
  1225. CompShift                        (wide *                    src,
  1226.                                  short                     shift)                                TWOWORDINLINE(0x7004, 0xABC2);
  1227.  
  1228. EXTERN_API( void )
  1229. CompMul                            (long                     src1,
  1230.                                  long                     src2,
  1231.                                  wide *                    dst)                                TWOWORDINLINE(0x7005, 0xABC2);
  1232.  
  1233. EXTERN_API( long )
  1234. CompDiv                            (wide *                    numerator,
  1235.                                  long                     denominator,
  1236.                                  long *                    remainder)                            TWOWORDINLINE(0x7006, 0xABC2);
  1237.  
  1238. EXTERN_API( void )
  1239. CompFixMul                        (wide *                    compSrc,
  1240.                                  Fixed                     fixSrc,
  1241.                                  wide *                    compDst)                            TWOWORDINLINE(0x7007, 0xABC2);
  1242.  
  1243. EXTERN_API( void )
  1244. CompMulDiv                        (wide *                    co,
  1245.                                  long                     mul,
  1246.                                  long                     divisor)                            TWOWORDINLINE(0x7008, 0xABC2);
  1247.  
  1248. EXTERN_API( void )
  1249. CompMulDivTrunc                    (wide *                    co,
  1250.                                  long                     mul,
  1251.                                  long                     divisor,
  1252.                                  long *                    remainder)                            TWOWORDINLINE(0x700C, 0xABC2);
  1253.  
  1254. EXTERN_API( long )
  1255. CompCompare                        (wide *                    a,
  1256.                                  wide *                    minusb)                                TWOWORDINLINE(0x7009, 0xABC2);
  1257.  
  1258. EXTERN_API( Fixed )
  1259. FixMulDiv                        (Fixed                     src,
  1260.                                  Fixed                     mul,
  1261.                                  Fixed                     divisor)                            TWOWORDINLINE(0x700A, 0xABC2);
  1262.  
  1263. EXTERN_API( Fixed )
  1264. UnsignedFixMulDiv                (Fixed                     src,
  1265.                                  Fixed                     mul,
  1266.                                  Fixed                     divisor)                            TWOWORDINLINE(0x700D, 0xABC2);
  1267.  
  1268. EXTERN_API( Fract )
  1269. FracSinCos                        (Fixed                     degree,
  1270.                                  Fract *                cosOut)                                TWOWORDINLINE(0x700B, 0xABC2);
  1271.  
  1272. EXTERN_API( Fixed )
  1273. FixExp2                            (Fixed                     src)                                TWOWORDINLINE(0x700E, 0xABC2);
  1274.  
  1275. EXTERN_API( Fixed )
  1276. FixLog2                            (Fixed                     src)                                TWOWORDINLINE(0x700F, 0xABC2);
  1277.  
  1278. EXTERN_API( Fixed )
  1279. FixPow                            (Fixed                     base,
  1280.                                  Fixed                     exp)                                TWOWORDINLINE(0x7010, 0xABC2);
  1281.  
  1282.  
  1283.  
  1284.  
  1285. typedef ComponentInstance                 GraphicsImportComponent;
  1286.  
  1287. enum {
  1288.     GraphicsImporterComponentType = FOUR_CHAR_CODE('grip')
  1289. };
  1290.  
  1291.  
  1292.  
  1293. /** These are GraphicsImport procedures **/
  1294. EXTERN_API( ComponentResult )
  1295. GraphicsImportSetDataReference    (GraphicsImportComponent  ci,
  1296.                                  Handle                 dataRef,
  1297.                                  OSType                 dataReType)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0001, 0x7000, 0xA82A);
  1298.  
  1299. EXTERN_API( ComponentResult )
  1300. GraphicsImportGetDataReference    (GraphicsImportComponent  ci,
  1301.                                  Handle *                dataRef,
  1302.                                  OSType *                dataReType)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0002, 0x7000, 0xA82A);
  1303.  
  1304. EXTERN_API( ComponentResult )
  1305. GraphicsImportSetDataFile        (GraphicsImportComponent  ci,
  1306.                                  const FSSpec *            theFile)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
  1307.  
  1308. EXTERN_API( ComponentResult )
  1309. GraphicsImportGetDataFile        (GraphicsImportComponent  ci,
  1310.                                  FSSpec *                theFile)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
  1311.  
  1312. EXTERN_API( ComponentResult )
  1313. GraphicsImportSetDataHandle        (GraphicsImportComponent  ci,
  1314.                                  Handle                 h)                                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);
  1315.  
  1316. EXTERN_API( ComponentResult )
  1317. GraphicsImportGetDataHandle        (GraphicsImportComponent  ci,
  1318.                                  Handle *                h)                                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);
  1319.  
  1320. EXTERN_API( ComponentResult )
  1321. GraphicsImportGetImageDescription (GraphicsImportComponent  ci,
  1322.                                  ImageDescriptionHandle * desc)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
  1323.  
  1324. EXTERN_API( ComponentResult )
  1325. GraphicsImportGetDataOffsetAndSize (GraphicsImportComponent  ci,
  1326.                                  unsigned long *        offset,
  1327.                                  unsigned long *        size)                                FIVEWORDINLINE(0x2F3C, 0x0008, 0x0008, 0x7000, 0xA82A);
  1328.  
  1329. EXTERN_API( ComponentResult )
  1330. GraphicsImportReadData            (GraphicsImportComponent  ci,
  1331.                                  void *                    dataPtr,
  1332.                                  unsigned long             dataOffset,
  1333.                                  unsigned long             dataSize)                            FIVEWORDINLINE(0x2F3C, 0x000C, 0x0009, 0x7000, 0xA82A);
  1334.  
  1335. EXTERN_API( ComponentResult )
  1336. GraphicsImportSetClip            (GraphicsImportComponent  ci,
  1337.                                  RgnHandle                 clipRgn)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x000A, 0x7000, 0xA82A);
  1338.  
  1339. EXTERN_API( ComponentResult )
  1340. GraphicsImportGetClip            (GraphicsImportComponent  ci,
  1341.                                  RgnHandle *            clipRgn)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x000B, 0x7000, 0xA82A);
  1342.  
  1343. EXTERN_API( ComponentResult )
  1344. GraphicsImportSetSourceRect        (GraphicsImportComponent  ci,
  1345.                                  const Rect *            sourceRect)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
  1346.  
  1347. EXTERN_API( ComponentResult )
  1348. GraphicsImportGetSourceRect        (GraphicsImportComponent  ci,
  1349.                                  Rect *                    sourceRect)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
  1350.  
  1351. EXTERN_API( ComponentResult )
  1352. GraphicsImportGetNaturalBounds    (GraphicsImportComponent  ci,
  1353.                                  Rect *                    naturalBounds)                        FIVEWORDINLINE(0x2F3C, 0x0004, 0x000E, 0x7000, 0xA82A);
  1354.  
  1355. EXTERN_API( ComponentResult )
  1356. GraphicsImportDraw                (GraphicsImportComponent  ci)                                FIVEWORDINLINE(0x2F3C, 0x0000, 0x000F, 0x7000, 0xA82A);
  1357.  
  1358. EXTERN_API( ComponentResult )
  1359. GraphicsImportSetGWorld            (GraphicsImportComponent  ci,
  1360.                                  CGrafPtr                 port,
  1361.                                  GDHandle                 gd)                                    FIVEWORDINLINE(0x2F3C, 0x0008, 0x0010, 0x7000, 0xA82A);
  1362.  
  1363. EXTERN_API( ComponentResult )
  1364. GraphicsImportGetGWorld            (GraphicsImportComponent  ci,
  1365.                                  CGrafPtr *                port,
  1366.                                  GDHandle *                gd)                                    FIVEWORDINLINE(0x2F3C, 0x0008, 0x0011, 0x7000, 0xA82A);
  1367.  
  1368. EXTERN_API( ComponentResult )
  1369. GraphicsImportSetMatrix            (GraphicsImportComponent  ci,
  1370.                                  const MatrixRecord *    matrix)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
  1371.  
  1372. EXTERN_API( ComponentResult )
  1373. GraphicsImportGetMatrix            (GraphicsImportComponent  ci,
  1374.                                  MatrixRecord *            matrix)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0013, 0x7000, 0xA82A);
  1375.  
  1376. EXTERN_API( ComponentResult )
  1377. GraphicsImportSetBoundsRect        (GraphicsImportComponent  ci,
  1378.                                  const Rect *            bounds)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0014, 0x7000, 0xA82A);
  1379.  
  1380. EXTERN_API( ComponentResult )
  1381. GraphicsImportGetBoundsRect        (GraphicsImportComponent  ci,
  1382.                                  Rect *                    bounds)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0015, 0x7000, 0xA82A);
  1383.  
  1384. EXTERN_API( ComponentResult )
  1385. GraphicsImportSaveAsPicture        (GraphicsImportComponent  ci,
  1386.                                  const FSSpec *            fss,
  1387.                                  ScriptCode             scriptTag)                            FIVEWORDINLINE(0x2F3C, 0x0006, 0x0016, 0x7000, 0xA82A);
  1388.  
  1389. EXTERN_API( ComponentResult )
  1390. GraphicsImportSetGraphicsMode    (GraphicsImportComponent  ci,
  1391.                                  long                     graphicsMode,
  1392.                                  const RGBColor *        opColor)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0017, 0x7000, 0xA82A);
  1393.  
  1394. EXTERN_API( ComponentResult )
  1395. GraphicsImportGetGraphicsMode    (GraphicsImportComponent  ci,
  1396.                                  long *                    graphicsMode,
  1397.                                  RGBColor *                opColor)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0018, 0x7000, 0xA82A);
  1398.  
  1399. EXTERN_API( ComponentResult )
  1400. GraphicsImportSetQuality        (GraphicsImportComponent  ci,
  1401.                                  CodecQ                 quality)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0019, 0x7000, 0xA82A);
  1402.  
  1403. EXTERN_API( ComponentResult )
  1404. GraphicsImportGetQuality        (GraphicsImportComponent  ci,
  1405.                                  CodecQ *                quality)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x001A, 0x7000, 0xA82A);
  1406.  
  1407. EXTERN_API( ComponentResult )
  1408. GraphicsImportSaveAsQuickTimeImageFile (GraphicsImportComponent  ci,
  1409.                                  const FSSpec *            fss,
  1410.                                  ScriptCode             scriptTag)                            FIVEWORDINLINE(0x2F3C, 0x0006, 0x001B, 0x7000, 0xA82A);
  1411.  
  1412. EXTERN_API( ComponentResult )
  1413. GraphicsImportSetDataReferenceOffsetAndLimit (GraphicsImportComponent  ci,
  1414.                                  unsigned long             offset,
  1415.                                  unsigned long             limit)                                FIVEWORDINLINE(0x2F3C, 0x0008, 0x001C, 0x7000, 0xA82A);
  1416.  
  1417. EXTERN_API( ComponentResult )
  1418. GraphicsImportGetDataReferenceOffsetAndLimit (GraphicsImportComponent  ci,
  1419.                                  unsigned long *        offset,
  1420.                                  unsigned long *        limit)                                FIVEWORDINLINE(0x2F3C, 0x0008, 0x001D, 0x7000, 0xA82A);
  1421.  
  1422. EXTERN_API( ComponentResult )
  1423. GraphicsImportGetAliasedDataReference (GraphicsImportComponent  ci,
  1424.                                  Handle *                dataRef,
  1425.                                  OSType *                dataRefType)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x001E, 0x7000, 0xA82A);
  1426.  
  1427. EXTERN_API( ComponentResult )
  1428. GraphicsImportValidate            (GraphicsImportComponent  ci,
  1429.                                  Boolean *                valid)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x001F, 0x7000, 0xA82A);
  1430.  
  1431.  
  1432. typedef ComponentInstance                 ImageTranscoderComponent;
  1433.  
  1434. enum {
  1435.     ImageTranscodererComponentType = FOUR_CHAR_CODE('imtc')
  1436. };
  1437.  
  1438.  
  1439. /** These are ImageTranscoder procedures **/
  1440. EXTERN_API( ComponentResult )
  1441. ImageTranscoderBeginSequence    (ImageTranscoderComponent  itc,
  1442.                                  ImageDescriptionHandle  srcDesc,
  1443.                                  ImageDescriptionHandle * dstDesc,
  1444.                                  void *                    data,
  1445.                                  long                     dataSize)                            FIVEWORDINLINE(0x2F3C, 0x0010, 0x0001, 0x7000, 0xA82A);
  1446.  
  1447. EXTERN_API( ComponentResult )
  1448. ImageTranscoderConvert            (ImageTranscoderComponent  itc,
  1449.                                  void *                    srcData,
  1450.                                  long                     srcDataSize,
  1451.                                  void **                dstData,
  1452.                                  long *                    dstDataSize)                        FIVEWORDINLINE(0x2F3C, 0x0010, 0x0002, 0x7000, 0xA82A);
  1453.  
  1454. EXTERN_API( ComponentResult )
  1455. ImageTranscoderDisposeData        (ImageTranscoderComponent  itc,
  1456.                                  void *                    dstData)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
  1457.  
  1458. EXTERN_API( ComponentResult )
  1459. ImageTranscoderEndSequence        (ImageTranscoderComponent  itc)                                FIVEWORDINLINE(0x2F3C, 0x0000, 0x0004, 0x7000, 0xA82A);
  1460.  
  1461. /* UPP call backs */
  1462.  
  1463. /* selectors for component calls */
  1464. enum {
  1465.     kGraphicsImportSetDataReferenceSelect            = 0x0001,
  1466.     kGraphicsImportGetDataReferenceSelect            = 0x0002,
  1467.     kGraphicsImportSetDataFileSelect                = 0x0003,
  1468.     kGraphicsImportGetDataFileSelect                = 0x0004,
  1469.     kGraphicsImportSetDataHandleSelect                = 0x0005,
  1470.     kGraphicsImportGetDataHandleSelect                = 0x0006,
  1471.     kGraphicsImportGetImageDescriptionSelect        = 0x0007,
  1472.     kGraphicsImportGetDataOffsetAndSizeSelect        = 0x0008,
  1473.     kGraphicsImportReadDataSelect                    = 0x0009,
  1474.     kGraphicsImportSetClipSelect                    = 0x000A,
  1475.     kGraphicsImportGetClipSelect                    = 0x000B,
  1476.     kGraphicsImportSetSourceRectSelect                = 0x000C,
  1477.     kGraphicsImportGetSourceRectSelect                = 0x000D,
  1478.     kGraphicsImportGetNaturalBoundsSelect            = 0x000E,
  1479.     kGraphicsImportDrawSelect                        = 0x000F,
  1480.     kGraphicsImportSetGWorldSelect                    = 0x0010,
  1481.     kGraphicsImportGetGWorldSelect                    = 0x0011,
  1482.     kGraphicsImportSetMatrixSelect                    = 0x0012,
  1483.     kGraphicsImportGetMatrixSelect                    = 0x0013,
  1484.     kGraphicsImportSetBoundsRectSelect                = 0x0014,
  1485.     kGraphicsImportGetBoundsRectSelect                = 0x0015,
  1486.     kGraphicsImportSaveAsPictureSelect                = 0x0016,
  1487.     kGraphicsImportSetGraphicsModeSelect            = 0x0017,
  1488.     kGraphicsImportGetGraphicsModeSelect            = 0x0018,
  1489.     kGraphicsImportSetQualitySelect                    = 0x0019,
  1490.     kGraphicsImportGetQualitySelect                    = 0x001A,
  1491.     kGraphicsImportSaveAsQuickTimeImageFileSelect    = 0x001B,
  1492.     kGraphicsImportSetDataReferenceOffsetAndLimitSelect = 0x001C,
  1493.     kGraphicsImportGetDataReferenceOffsetAndLimitSelect = 0x001D,
  1494.     kGraphicsImportGetAliasedDataReferenceSelect    = 0x001E,
  1495.     kGraphicsImportValidateSelect                    = 0x001F,
  1496.     kImageTranscoderBeginSequenceSelect                = 0x0001,
  1497.     kImageTranscoderConvertSelect                    = 0x0002,
  1498.     kImageTranscoderDisposeDataSelect                = 0x0003,
  1499.     kImageTranscoderEndSequenceSelect                = 0x0004
  1500. };
  1501.  
  1502.  
  1503. #if PRAGMA_STRUCT_ALIGN
  1504.     #pragma options align=reset
  1505. #elif PRAGMA_STRUCT_PACKPUSH
  1506.     #pragma pack(pop)
  1507. #elif PRAGMA_STRUCT_PACK
  1508.     #pragma pack()
  1509. #endif
  1510.  
  1511. #ifdef PRAGMA_IMPORT_OFF
  1512. #pragma import off
  1513. #elif PRAGMA_IMPORT
  1514. #pragma import reset
  1515. #endif
  1516.  
  1517. #ifdef __cplusplus
  1518. }
  1519. #endif
  1520.  
  1521. #endif /* __IMAGECOMPRESSION__ */
  1522.  
  1523.